//系统配置模块
import request from "@/utlis/request";

enum API {
  CONFIGFINDPAGE_URL = "/config/findPage", //查询列表
  CONFIGSAVE_URL = "/config/save", //新增或者编辑
  CONFIGDELETE_URL = "/config/delete", //删除
  CONFIGFINDBYLABLE_URL = "/config/findByLable", //根据label查询对象
}

export const reqFindPage = async (data: any) => {
  return request.post<any, any>(API.CONFIGFINDPAGE_URL, data);
};

export const reqSave = async (data: any) => {
  return request.post<any, any>(API.CONFIGSAVE_URL, data);
};

export const reqDelete = async (data: any) => {
  return request.post<any, any>(API.CONFIGDELETE_URL, data);
};

export const reqFindbyLable = async (lable: string) => {
  return request.get<any, any>(API.CONFIGFINDBYLABLE_URL + "?lable=" + lable);
};
